home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / tracker-4.13.lha / tracker / channel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-15  |  3.6 KB  |  123 lines

  1. /* channel.h 
  2.     vi:ts=3 sw=3:
  3.  */
  4.  
  5. /* $Id: channel.h,v 4.7 1995/02/08 13:14:56 espie Exp $
  6.  * $Log: channel.h,v $
  7.  * Revision 4.7  1995/02/08  13:14:56  espie
  8.  * *** empty log message ***
  9.  *
  10.  * Revision 4.7  1995/02/08  13:14:56  espie
  11.  * *** empty log message ***
  12.  *
  13.  * Revision 4.6  1995/02/01  20:41:45  espie
  14.  * *** empty log message ***
  15.  *
  16.  * Revision 4.6  1995/02/01  20:41:45  espie
  17.  * *** empty log message ***
  18.  *
  19.  * Revision 4.5  1995/02/01  16:39:04  espie
  20.  * Includes moved to defs.h
  21.  *
  22.  * Revision 4.5  1995/02/01  16:39:04  espie
  23.  * Includes moved to defs.h
  24.  *
  25.  * Revision 3.9  1993/11/17  15:31:16  espie
  26.  * audio_channel private.
  27.  * Amiga support.
  28.  * Added finetune.
  29.  *
  30.  * Revision 2.7  1992/11/13  13:24:24  espie
  31.  * Added parameters for extended Retriger command.
  32.  * Added transpose feature.
  33.  * Structured part of the code, especially replay ``automaton''
  34.  * and setting up of effects.
  35.  *
  36.  * Revision 1.5  1991/11/16  16:54:19  espie
  37.  * Bug correction: when doing arpeggio, there might not
  38.  * be a new note, so we have to save the old note value
  39.  * and do the arppeggio on that note.
  40.  * Added fields for arpeggio.
  41.  */
  42.  
  43.      
  44. #ifndef NUMBER_PATTERNS
  45. #define NUMBER_PATTERNS 128
  46. #endif
  47.  
  48. #define MAX_ARP 3
  49.      
  50. /* there is no note in each channel initially.
  51.  * This is defensive programming, because some
  52.  * commands rely on the previous note. Checking
  53.  * that there was no previous note is a way to
  54.  * detect faulty modules.
  55.  */
  56. #define NO_NOTE 255
  57.  
  58. struct channel
  59.    {
  60.    struct sample_info *samp;
  61.    struct audio_channel *audio;
  62.    int finetune;
  63.    int volume;             /* current volume of the sample (0-64) */
  64.    int pitch;              /* current pitch of the sample */
  65.    int note;               /* we have to save the note cause */
  66.                            /* we can do an arpeggio without a new note */
  67.     
  68.    int arp[MAX_ARP];       /* the three pitch values for an arpeggio */
  69.    int arpindex;           /* an index to know which note the arpeggio is doing */
  70.  
  71.    int viboffset;          /* current offset for vibrato (if any) */
  72.    int vibdepth;           /* depth of vibrato (if any) */
  73.  
  74.    int slide;              /* step size of pitch slide */
  75.  
  76.    int pitchgoal;          /* pitch to slide to */
  77.    int pitchrate;          /* step rate for portamento */
  78.  
  79.    int volumerate;         /* step rate for volume slide */
  80.  
  81.    int vibrate;            /* step rate for vibrato */
  82.  
  83.    int retrig;             /* delay for extended retrig command */
  84.    int current;
  85.                            /* current command to adjust parameters */
  86.    void (*adjust) P((struct channel *ch));
  87.    };
  88.  
  89. #define DO_NOTHING 0 
  90. #define SET_SPEED 1
  91. #define SET_SKIP 2
  92. #define SET_FASTSKIP 4
  93. #define SET_FINESPEED 32
  94.  
  95. #define JUMP_PATTERN 8
  96. #define DELAY_PATTERN 16
  97.  
  98. #define NORMAL_SPEED 6
  99. #define NORMAL_FINESPEED 125
  100.  
  101. struct automaton
  102.    {
  103.    int pattern_num;           /* the pattern in the song */
  104.    int note_num;              /* the note in the pattern */
  105.    struct block *pattern;     /* the physical pattern */
  106.    struct song_info *info;    /* we need the song_info */
  107.  
  108.    char gonethrough[NUMBER_PATTERNS + 1];  /* to check for repeats */
  109.  
  110.    int counter;               /* the fine position inside the effect */
  111.    int speed;                 /* the `speed', number of effect repeats */
  112.    int finespeed;             /* the finespeed, base is 100 */
  113.  
  114.    int do_stuff;              /* keeping some stuff to do */
  115.                               /* ... and parameters for it: */
  116.    int new_speed, new_note, new_pattern, new_finespeed;
  117.  
  118.    int pitch, note, para;     /* some extra parameters effects need */
  119.  
  120.    int loop_note_num, loop_counter;
  121.                               /* for command E6 */
  122.    };
  123.